<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>当前告警</title>
	<meta name="decorator" content="default"/>
	<tags:import includes="spinner,bootbox,form"></tags:import>
	<script src="${ctxStatic}/modules/alarm/alarmprop.js"></script>	
	<script src="${ctxStatic}/modules/alarm/alarmcur.js"></script>
	<script type="text/javascript">
		var _ctx = '${ctx}';
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
			return false;
		}
	</script>
</head>
<body>
	<br>
	<form:form id="searchForm" modelAttribute="alarmcurrent" action="${ctx}/alarm/alarmcur/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>		
		<!--添加查询条件-->
	    <div class="control-group">
	        <span class="span3">
	            <label class="control-label" for="form-field-5">站&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;点：</label>
	        </span>
	        &nbsp;
	        <span class="span3">
	          <label>
	            <select id="siteSel" class="easyui-combobox" style="width:160px;" name="nenode.site.sid">
	                 <option value="0" selected>ALL</option>
	                 <c:forEach items="${slist}" var="siteinfo">
	                     <c:if test="${siteinfo.sid==acur.nenode.site.sid}">
	                      <option value="${siteinfo.sid}" selected>${siteinfo.sname}</option>
	                     </c:if>
	                     <c:if test="${siteinfo.sid!=acur.nenode.site.sid}">
	                      <option value="${siteinfo.sid}">${siteinfo.sname}</option>
	                     </c:if>	                     
	                 </c:forEach>	                 
	            </select>
	          </label>
	        </span>
	        &nbsp;
	        <span class="span3">
	          <label class="control-label" for="form-field-5">网元标识：</label>
	        </span>	  
	        &nbsp;
	        <span class="span3">
	          <label>
	            <select id="neSel" class="easyui-combobox" style="width:160px;" name="nenode.nid">
	                <option value="0" selected>ALL</option>
	                <c:forEach items="${nelist}" var="neinfo">
	                   <c:if test="${neinfo.nid==acur.nenode.nid}">
 	                     <option value="${neinfo.nid}" selected>${neinfo.ip}</option>
 	                   </c:if>
	                   <c:if test="${neinfo.nid!=acur.nenode.nid}">
 	                     <option value="${neinfo.nid}">${neinfo.ip}</option>
 	                   </c:if> 	                   
 	                </c:forEach>	                
	            </select>
	          </label>
	        </span>
	        &nbsp;
	        <span class="span3">
	          <label class="control-label" for="form-field-5">机&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;盘：</label>
	        </span>	  
	        &nbsp;
	        <span class="span3">
	          <label>
	            <select id="slotSel" class="easyui-combobox" style="width:160px;" name="slot.slotid">
	                <option value="0" selected>ALL</option>
	                <c:forEach items="${slotlist}" var="slot">
	                  <c:if test="${slot.card.cardid==acur.slot.slotid}">
 	                    <option value="${slot.card.cardid}" selected>${slot.num}：${slot.card.cardtype.cardtype}</option>
 	                  </c:if>
	                  <c:if test="${slot.card.cardid!=acur.slot.slotid}">
 	                    <option value="${slot.card.cardid}">${slot.num}：${slot.card.cardtype.cardtype}</option>
 	                  </c:if> 	                  
 	                </c:forEach>	                
	            </select>
	          </label>
	        </span>
	    </div>
		<br>
	    <div class="control-group">
	        <span class="span3">
	            <label class="control-label" for="form-field-5">严重程度：</label>
	        </span>
	        &nbsp;
	        <span class="span3">
	          <label>
	            <select class="easyui-combobox" style="width:160px;" name="severity.id">
	                <option value="0" selected>ALL</option>
	                <c:forEach items="${selist}" var="seinfo">
	                 <c:if test="${seinfo.id==acur.severity.id}"> 
	                  <option value="${seinfo.id}" selected>${seinfo.severity}</option>
	                 </c:if>
	                 <c:if test="${seinfo.id!=acur.severity.id}"> 
	                  <option value="${seinfo.id}">${seinfo.severity}</option>
	                 </c:if>	                 
	              </c:forEach>	                
	            </select>
	          </label>
	        </span>
	        &nbsp;
	        <span class="span3">
	          <label class="control-label" for="form-field-5">告警类型：</label>
	        </span>	  
	        &nbsp;
	        <span class="span3">
	          <label>
	        	<select class="easyui-combobox" style="width:160px;" name="atype.aid">
	                <option value="0" selected>ALL</option>
	                <c:forEach items="${atlist}" var="atype">
	                  <c:if test="${atype.aid==acur.atype.aid}">
	                   <option value="${atype.aid}" selected>${atype.alarmdesc}</option>
	                  </c:if>
	                  <c:if test="${atype.aid!=acur.atype.aid}">
	                   <option value="${atype.aid}">${atype.alarmdesc}</option>
	                  </c:if>	                  
	                </c:forEach>	                
	            </select>
	          </label>
	        </span>
	        &nbsp;
	        <span class="span3">
	          <button id="btn_query" class="btn btn-info">
	        	查  询
	      	  </button>
	        </span>
	        &nbsp;
	        <span class="span3">
	          <button id="btn_sync" class="btn btn-info">
	        	同  步
	      	  </button>
	        </span>
	        &nbsp;
	        <span class="span3">
	      	  <a id="btn_conf" class="btn btn-info">告警确认</a>
	        </span>	        
	    </div>		
	    <br>
	</form:form>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">		
	<thead>
		<tr>
 		  <th class="center" style="width: 50px;">
		  <label> 
		    <input type="checkbox" class="ace" /><span class="lbl"></span>
		  </label>
		</th>
	   <th class="center">站点</th>
	   <th class="center">网元标识</th>
	   <th class="center">槽位</th>
	   <th class="center">机盘</th>	   
	   <th class="center">严重程度</th>	 
	   <th class="center">告警类型</th>
	   <th class="center">Trap类型</th>
	   <th class="center">发生时间</th>
 		<th class="center">操作</th> 
		</tr>
	</thead>
	<tbody>
	  <c:forEach items="${pages.list}" var="curalarm">
		<tr>
 		<td class="center"> 
 		  <label> 
 				<input value="${curalarm.id}" type="checkbox" class="ace" />  
 				<span class="lbl"></span> 
 		  </label> 
 		 </td> 
 		 <td class="center">${curalarm.nenode.site.sname}</td>
 		 <td class="center">${curalarm.nenode.ip}</td>
         <td class="center">${curalarm.slot.num}</td>
         <td class="center">${curalarm.slot.card.cardname}</td> 		 
		 <td class="center">${curalarm.severity.severity}</td>
         <td class="center">${curalarm.atype.alarmdesc}</td>
         <td class="center">${curalarm.traptype.traptype}</td>
         <td class="center">${curalarm.atime}</td>
         <td class="center"><a name="cerAlarm">详细</a><span style='display:none'>${curalarm.id}</span></td>
        </tr>
	   </c:forEach>
	</tbody>
	</table>	
	${pages}

<div class="progress" style="display:none;">
  <div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;">
    <span class="sr-only">60% Complete</span>
  </div>
</div>

<div id="modalTable" action="new" class="fade modal" tabindex="-1" style="display:none;">
		<div class="modal-dialog">
			<div class="modal-content" >
				<div class="modal-header no-padding">
					<div class="table-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
							<span class="white">&times;</span>
						</button>
						<span id='modalTitle'>当前告警信息</span>
					</div>
				</div>
				<br>
				<form id="frmSubmit" class="form-horizontal" action="" role="form" method="post">
					<input type="hidden" name="sort" value="30"/>
					<input type="hidden" name="m_id"/>
				        <div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">告警类型</label>
							<div class="col-sm-9">
								<input name="m_atype" type="text" class="col-xs-10" readonly/>
							</div>
						</div>						
				        <div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">Trap类型</label>
							<div class="col-sm-9">
                              <input name="m_traptype" type="text" class="col-xs-10" readonly/>							
							</div>
						</div>		
				        <div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">网元</label>
							<div class="col-sm-9">
                              <input name="m_ip" type="text" class="col-xs-10" readonly/>	
							</div>
						</div>						
				        <div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">机盘</label>
							<div class="col-sm-9">
	                           <input name="m_slot" type="text" class="col-xs-10" readonly/>
							</div>
						</div>				
				        <div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">板卡</label>
							<div class="col-sm-9">
	                            <input name="m_card" type="text" class="col-xs-10" readonly/>						
							</div>
						</div>									
				        <div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">严重程度</label>
							<div class="col-sm-9">
                              <input name="m_severity" type="text" class="col-xs-10" readonly/>
							</div>
						</div>						
				        <div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">发生时间</label>
							<div class="col-sm-9">
                                <input name="m_sdate" type="text" class="col-xs-10" readonly/>							
							</div>
						</div>	
				        <div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">工作模式</label>
							<div class="col-sm-9">
	                            <input name="m_omode" type="text" class="col-xs-10" readonly/>						
							</div>
						</div>								
					<div class="space-4"></div>
				</form>
			</div>
		</div>
</div> 

</body>
</html>
